Skip to content

Conversation

@lzrd
Copy link

@lzrd lzrd commented Dec 9, 2025

Mostly mechanical fixes: removing needless borrows, adding lifetime annotations, using modern numeric constants (i32::MAX), and suppressing warnings for dropshot-generated dead code.

Notable equivalences:

  • .as_bytes().len() to .len() on String: both return byte count
  • .trim().split_whitespace() to .split_whitespace(): split_whitespace already skips leading/trailing whitespace
  • .into_iter() to .iter() on slices: both yield &T

Mostly mechanical fixes: removing needless borrows, adding lifetime
annotations, using modern numeric constants (i32::MAX), and suppressing
warnings for dropshot-generated dead code.

Notable equivalences:
- .as_bytes().len() to .len() on String: both return byte count
- .trim().split_whitespace() to .split_whitespace(): split_whitespace
  already skips leading/trailing whitespace
- .into_iter() to .iter() on slices: both yield &T
Copy link
Collaborator

@jclulow jclulow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems broadly good! A few nits.

@jclulow jclulow changed the title Fix clippy warnings clippy lints Dec 9, 2025
lzrd and others added 6 commits December 10, 2025 09:37
Co-authored-by: Joshua M. Clulow <[email protected]>
Co-authored-by: Joshua M. Clulow <[email protected]>
Co-authored-by: Joshua M. Clulow <[email protected]>
Co-authored-by: Joshua M. Clulow <[email protected]>
@lzrd lzrd requested a review from jclulow December 10, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants